 package Thread;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingDeque;
import java.util.concurrent.BlockingQueue;

 public class ThreadDemo4 {
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue<String> queue = new ArrayBlockingQueue<>(100);
        queue.put("aaa");

        String ele = queue.take();
        System.out.println("elem = "+ ele);
        ele = queue.take();
        System.out.println("elem = "+ ele);
    }
}
